/**
 * @Author 天下无敌
 * @Date 
 * @AIDE AIDE+ 
 */
package com.ecs.core.gsystem.player;
import com.artemis.BaseSystem;
import com.ecs.core.gsystem.CameraSystem;
import static com.ecs.core.GameContext.metersToPixels;
import com.badlogic.gdx.math.Vector3;

public class CamerafollPlayerPosSystem extends BaseSystem
{
	private PlayerDataSystem playerSystem;
	private CameraSystem cameraSystem;
	private final Vector3 playerPos = new Vector3();
	@Override
	protected void processSystem()
	{
		float playerX = metersToPixels(playerSystem.getPlayerCenterX());
		float playerY = metersToPixels(playerSystem.getPlayerCenterY());
		playerPos.set(playerX,playerY,0);
		cameraSystem.getCamera().position.lerp(playerPos,4f * world.getDelta());
	}

	
}
